<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_info', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->defalut(0)->comment('用户id');
            $table->integer('photo_id')->defalut(0)->comment('用户头像');
            $table->string('realname',64)->nullable()->comment('真实姓名');
            $table->string('nickname',64)->nullable()->comment('昵称');
            $table->tinyInteger('sex')->default(0)->comment('性别，0：保密，1：男 ，2：女 ');
            $table->timestamp('birth')->nullable()->comment('出生年月日');
            $table->string('province',64)->nullable()->comment('省份');
            $table->string('city',64)->nullable()->comment('城市');
            $table->string('area',64)->nullable()->comment('地区');
            $table->string('address_detail',64)->nullable()->comment('详细地址');
            $table->string('tag')->nullable()->comment('个人标签');
            $table->integer('integral')->default(0)->comment('积分');
            $table->text('skill')->nullable()->comment('技能');
            $table->integer('personal_auth')->comment('认证情况 0：未认证 1：已认证 2：认证中 3：认证失败');
            $table->integer('company_auth')->comment('认证情况 0：未认证 1：已认证 2：认证中 3：认证失败');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('user_info');
    }
}
